<!doctype html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>{:env('app.webtitle')}</title>
  <meta name="keywords" content="">
  <meta name="description" content="">
  <link rel="stylesheet" href="/static/index/jq22.css?v=6">
<script src="/static/index/jquery.min.js"></script>


<!--[if (gte IE 6)&(lte IE 8)]>

		<script src="js/lanrenzhijia.js"></script>

	<![endif]-->

</head>

<body style="display: flex; justify-content: center; align-items: center">

<div class="bg">
  <div class="login-out">

    <span style="font-size: 18px;">
          {$user.name}
    </span>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="{:url('index/logout')}" style="font-size: 18px;">{:lang("logout")}</a>
    <div class="showTime">当前时间：2021-7-19 20:35:16</div>
  </div>
</div>

<ul class="menu">
  <li onclick="dianju('{:url("index/index2")}')">
    <span class="title">数据管理</span>
  </li>
  <li onclick="dianju('{:url("user/index")}')"><span class="title">权限设置</span></li>
  <li><span class="title"></span></li>
  <li><span class="title"></span></li>
  <li><span class="title"></span></li>
  <li><span class="title"></span></li>

</ul>

<script>
  function dianju(url){
    if(url != ''){
      window.location.href=url;
    }
  }

  //时间生成器
  var t = null;
  t = setTimeout(time, 1000); //開始运行
  function time() {
    clearTimeout(t); //清除定时器
    dt = new Date();
    var y = dt.getFullYear();
    var mt = dt.getMonth() + 1;
    var day = dt.getDate();
    var h = dt.getHours(); //获取时
    var m = dt.getMinutes(); //获取分
    var s = dt.getSeconds(); //获取秒
    document.querySelector(".showTime").innerHTML =
            "当前时间：" +
            y +
            "-" +
            mt +
            "-" +
            day +
            " " +
            h +
            ":" +
            m +
            ":" +
            s +
            "";
    t = setTimeout(time, 1000); //设定定时器，循环运行
  }


	  (function(){

		// Append a close trigger for each block

		$('.menu .content').append('<span class="close">x</span>');

		// Show window

		function showContent(elem){

			hideContent();

			elem.find('.content').addClass('expanded');

			elem.addClass('cover');	

		}

		// Reset all

		function hideContent(){
			$('.menu .content').removeClass('expanded');

			$('.menu li').removeClass('cover');		

		}

		

		// When a li is clicked, show its content window and position it above all

		$('.menu li').click(function() {
            $('.test').css('display','block');
			showContent($(this));

		});		

		// When tabbing, show its content window using ENTER key

		$('.menu li').keypress(function(e) {

			if (e.keyCode == 13) { 

				showContent($(this));

			}

		});



		// When right upper close element is clicked  - reset all

		$('.menu .close').click(function(e) {
          $('.test').css('display','none');
			e.stopPropagation();

			hideContent();

		});		

		// Also, when ESC key is pressed - reset all

		$(document).keyup(function(e) {

			if (e.keyCode == 27) { 

			  hideContent();

			}

		});

		

	  })();

	</script>

</body>
</html>